package com.guihuo.mq.rocket;

/**
 * 项目名称：middleware-learning
 * 类名称：RocketMQConsumerTest
 * 类描述：RocketMQConsumerTest
 * 创建时间：2019/1/11
 *
 * @author guihuo   (E-mail:1620657419@qq.com)
 * @version v1.0
 */
public class RocketMQConsumerTest {

    public static void main(String[] args) {
        String mqNameServer = "127.0.0.1:9876";
        String mqTopics = "MQ-MSG-TOPICS-TEST";

        String consumerMqGroupName = "CONSUMER-MQ-GROUP";
        RocketMQListener mqListener = new RocketMQListener();
        RocketMQConsumer mqConsumer = new RocketMQConsumer(mqListener, mqNameServer, consumerMqGroupName, mqTopics);
        mqConsumer.init();

        try {
            Thread.sleep(1000 * 60L);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }

}
